<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./kvue.js"></script>
</head>

<body>
  <div id="el">
    <p>{{counter}}</p>
    <p k-text="counter"></p>
    <p k-html="desc"></p>
    <input type="text" k-model="text">
    <p>{{text}}</p>
    <button @click="handleClick">reset</button>
  </div>
  <script>
    // const foo = {
    //   date: new Date().toLocaleTimeString(),
    //   baz: {
    //     a: 1,
    //   },
    // }

    // defineReactive(foo, 'date', foo.date)
    // observe(foo)
    const app = new KVue({
      el: '#el',
      data: {
        counter: 1,
        text: '',
        desc: '<p>村长<strong>真棒</strong>!</p>'
      },
      methods: {
        handleClick() {
          this.text = ''
        }
      },
    })
  </script>
</body>

</html>